<?php
session_start();
include_once("function_right.php");
if(!JudgeUserRight()) return FALSE;
?>

<?php
include_once "function_obj_service.php";

$in_array['Name'] = base64_encode($_POST['objname']);
$in_array['Protocol'] = $_POST['protocol'];
$in_array['DstStartPort'] = $_POST['dstsport'];
$in_array['DstEndPort'] = $_POST['dsteport'];
$in_array['SrcStartPort'] = $_POST['srcsport'];
$in_array['SrcEndPort'] = $_POST['srceport'];

/*if ($_POST['icmptype'] == "any")
	$in_array['IcmpType'] = "";
else
*/

$in_array['IcmpType'] = $_POST['icmptype'];

if ($_POST['protocol'] == "OTHER")
{
	$in_array['Protocol'] = $_POST['proto_code'];
}

AppendXmlServiceObject($in_array);

include "function_misc_log.php";
$in_array['Name'] = "'". ($in_array['Name']). "'";
logger("Add", $in_array,"Object_Srv");

include "function_web_misc.php";
PrintSuccessPageAndJump('obj_srv_object_list.php');

//echo("<meta http-equiv='refresh'content=0;URL='obj_srv_object_list.php'>");
?>
